#ifndef _IPC_DEF_H_
#define _IPC_DEF_H_

#define SOCK_BUF_SIZE (BUF_SIZE << 2)
/*
 * One byte opcode.
 * One byte tag type.
 * Four byte tag length.
 * Tag value.
 */

#define TAG_OPCODE   0x80       /* 1, &byte */
#define TAG_UID      0x81       /* sizeof(uid_t), (char *)&euid, will be ignored */
#define TAG_PRIOR    0x82       /* sizeof(unsignd char), &byte */
#define TAG_PATH     0x83
#define TAG_ARGS     0x84       /* strlen(fargs[i]), fargs[i] */
#define TAG_JID      0x85       /* sizeof(unsigned int), (char *)&jid */
#define TAG_END      0xFF       /* 0, NULL */

#define OP_ENQ       0x90
#define OP_DEQ       0x91
#define OP_STA       0x92

struct tag_struct {
    unsigned char tag_type;
    unsigned char tag_len;
    unsigned char tag_value[256];
};

#endif
